package cn.wp.org.service.impl;

import cn.wp.basic.service.impl.BaseServiceImpl;
import cn.wp.org.domain.Employee;
import cn.wp.org.mapper.EmployeeMapper;
import cn.wp.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class EmployeeServiceImpl extends BaseServiceImpl<Employee> implements IEmployeeService {

    @Autowired
    // 编译器发现你没有实现类就给你报错，这个实际上是由Spring管理实现的，在配置中【App.class中@MapperScan】
    private EmployeeMapper employeeMapper;

    @Override
    @Transactional
    public void patchDel(List<Long> ids) {
        employeeMapper.patchDel(ids);
    }

    @Override
    public Employee loadByLoginInfoId(Long id) {
        return employeeMapper.loadByLoginInfoId(id);
    }
}
